function main() {
    //程序入口
    require(["pluginAttach", "knockout"], function (pluginAttach, ko) {
        function ViewModel() {
            this.employees = ko.observableArray([
                { name: "Kari", active: ko.observable(false) },
                { name: "Brynn", active: ko.observable(false) },
                { name: "Nora", active: ko.observable(true) },
            ]);
            this.displayMode = function (employee, bindingContext) {
                // Initially "Kari" uses the "active" template, while the others use "inactive"
                return employee.active() ? "active" : "inactive";
            };
            this.init = function () {
                this.employees()[0].active(true);
            };
        }
        var viewModel = new ViewModel();
        viewModel.init();
        ko.applyBindings(viewModel, document.getElementById("root"));
    });
}
require(["../scripts/require.config"], main);
